export default `import { defineComponent, ref } from 'vue'
import Edit from './components/Edit'
import { NButton } from 'naive-ui'
export default defineComponent({
  setup() {
    const addRef = ref()
    const handAdd = () => {
      addRef.value.open()
    }
    const handEdit = () => {
      addRef.value.open({
        id: 1,
          ...
      })
    }
    return () => (
      <>
        <NButton onClick={handAdd}>添加</NButton>
        <NButton onClick={handEdit}>编辑</NButton>
        <Edit ref={addRef} />
      </>
    )
  }
})`
